# 循环
# 方式1: for-in
names = ['a', 'b', 'c']
for name in names:
    print(name)

# 使用range函数生成一个整数序列, range(5)->生成0-4
sum = 0
for x in list(range(101)):
    sum += x
print(sum)

# 方式2： while
sum2 = 0
n = 10
while n > 0:
    sum2 += n
    n = n-1
print(sum2)
